You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
3.0 KiB
109 lines
3.0 KiB
<template>
|
|
<!-- Banner -->
|
|
<Banner :layout="layout" />
|
|
|
|
<div class="container md:w-screen-xl m-auto">
|
|
<div class="flex flex-col" v-if="company">
|
|
<Breadcrumb :data="form" :title="`插件详情`" />
|
|
<div :class="company" class="page-main w-full bg-white rounded-lg">
|
|
<div class="p-4 leading-7">
|
|
<div class="goods-info flex">
|
|
<el-avatar :src="company.companyLogo" size="large" />
|
|
<div class="flex flex-col ml-2">
|
|
<div class="text-lg">{{ company.tenantName }}</div>
|
|
<div class="text-gray-400">{{ company.comments }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 空白页 -->
|
|
<div class="mt-[60px]" v-if="!company">
|
|
<el-empty description="404 页面不存在"></el-empty>
|
|
</div>
|
|
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { Search } from '@element-plus/icons-vue'
|
|
import type {ApiResult, PageResult} from "~/api";
|
|
import {useServerRequest} from "~/composables/useServerRequest";
|
|
import {useWebsite} from "~/composables/configState";
|
|
import type {Navigation} from "~/api/cms/navigation/model";
|
|
import {getIdByParam, getPath} from "~/utils/common";
|
|
import type {Company, CompanyParam} from "~/api/system/company/model";
|
|
import type {Tenant} from "~/api/system/tenant/model";
|
|
import {navigateTo} from "#imports";
|
|
import type {Website} from "~/api/cms/website/model";
|
|
import PageContainer from "~/components/PageContainer.vue";
|
|
import Breadcrumb from "~/components/Breadcrumb.vue";
|
|
|
|
const route = useRoute();
|
|
|
|
// 页面信息
|
|
const runtimeConfig = useRuntimeConfig();
|
|
const list = ref<Company[]>([]);
|
|
const activeName = ref('web');
|
|
const page = ref<number>(1);
|
|
const resultText = ref('');
|
|
const layout = ref<any>();
|
|
|
|
// 获取状态
|
|
const form = ref<Navigation>();
|
|
const website = useWebsite();
|
|
const company = ref<Company>()
|
|
|
|
// 搜索表单
|
|
const where = reactive<CompanyParam>({
|
|
keywords: ''
|
|
});
|
|
|
|
const navTo = (item: Company) => {
|
|
navigateTo(`/market/${item.companyId}`)
|
|
}
|
|
|
|
// 请求数据
|
|
const reload = async () => {
|
|
|
|
const { data: nav } = await useServerRequest<ApiResult<Navigation>>('/cms/cms-navigation/getNavigationByPath',{query: {path: getPath()}})
|
|
if(nav.value?.data){
|
|
form.value = nav.value?.data;
|
|
}
|
|
// 页面布局
|
|
if(form.value?.layout){
|
|
layout.value = JSON.parse(form.value?.layout)
|
|
}
|
|
useHead({
|
|
title: `搜索结果 - ${website.value.websiteName}`,
|
|
bodyAttrs: {
|
|
class: "page-container",
|
|
}
|
|
});
|
|
await handleClick()
|
|
}
|
|
|
|
// 搜索结果
|
|
const handleClick = async () => {
|
|
if(activeName.value == 'web'){
|
|
const {data: response} = await useServerRequest<ApiResult<Company>>(`/system/company/profileAll/${getIdByParam()}`,{baseURL: runtimeConfig.public.apiServer})
|
|
if(response.value?.data){
|
|
if (response.value.data) {
|
|
company.value = response.value.data
|
|
}
|
|
if(!response.value){
|
|
resultText.value = '暂无相关结果'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
watch(
|
|
() => route,
|
|
() => {
|
|
reload();
|
|
},
|
|
{ immediate: true }
|
|
);
|
|
|
|
</script>
|